﻿using DevExpress.XtraSplashScreen;

namespace Com.OpenCode.Framework.DevForm
{
    public static class OpenCodeSplashScreenManager
    {
        public static void Show(string info = "")
        {
            Close();
            SplashScreenManager.ShowForm(typeof (SystemWaitForm), true, true);
            if (!string.IsNullOrEmpty(info))
            {
                SplashScreenManager.Default.SetWaitFormDescription(info);
            }
        }

        public static void Close()
        {
            if (SplashScreenManager.Default != null)
            {
                SplashScreenManager.CloseForm();
            }
        }
    }
}